// Top level function that invokes and displays the tests.
function main()
{
Response.Write( htmlHeader() );
Response.Write( "<h1>Adobe GoLive Dynamic Link Troubleshooting Report</h1>\n" );
Response.Write( "<p>Copyright 1999-2000 Adobe Systems Incorporated. All rights reserved.</p>\n" );
Response.Write( "<p>This report contains information about the status of your ASP server software and the Adobe GoLive Dynamic Link files installed on the server.\n" );
Response.Write( "Below you will find the results of various tests performed by this troubleshooting script.</p>\n" );
Response.Write( "<p>Please refer to chapter 16 of the GoLive User Guide for more information about installing and configuring your ASP server to work with Adobe GoLive.</p>\n" );
var TestResults = new Array();
// perform each test and store resulting Test objects in TestResults
report += "<h3>How to read the test results</h3>\n";
report += Test.ResultStr[0] + ": The test was successful, no further action required.</p>\n";
report += Test.ResultStr[1] + ": Problem(s) were found. Refer to the test report details for more information.</p>\n";
report += Test.ResultStr[2] + ": This may or may not be a problem depending on your environment, your should manually verify this information. Read the report details for instructions.</p>\n";
return report;
}
function reportDetail( TestResults )
{
var report = "";
for( var i = 0; i < TestResults.length; i++ ){
var test = TestResults[i];
report += "<hr>\n";
report += "<a name=\"" + ( i + 1 ) + "\"></a>\n";
report += "<h2> Test " + ( i + 1 ) + ": " + test.title + "</h2>\n";
test.Fail( "Script version 3.1.2124 is not supported. Please update script engine with Windows NT service pack 5 or later. For Windows 98, please install newer version of Internet Explore." );
}else{
test.Pass( "Both server script versions are 3.0 or later." );
}
}else{
test.Fail( "Both server script version should be 3.0 or later." );
}
return test;
}
function checkVirtualPathSetting()
{
var test = new Test( "Check virtual path setting" );
test.description = "This test checks that the virtual path to your web site folder for your URL points to the correct place. "
test.description += "APPL_PHYSICAL_PATH is your virtual root setting. "
test.description += "PATH_TRANSLATED is the physical path setting for this page. "
test.description += "PATH_INFO, SCRIPT_NAME & URL contains the URL to this page without the hostname. "
test.Verify( "You should verify that your virtual path settings are correct." );
return test;
}
function checkPasswordSetting()
{
var test = new Test( "Check password setting of web server" );
test.description = "This test checks whether the web server is set to require user names and passwords. If so, only basic authentication is supported by Dynamic Link. "
test.description += "If any of the following server variables have a value, there is a password required to access the server. "
test.description += "In case of basic authentication, server variable HTTP_AUTHORIZATION's value will start \"Basic \". "
test.description += "Other http authentication methods are not supported. "
var auth_user = Request.ServerVariables( "AUTH_USER" );
var remote_user = Request.ServerVariables( "REMOTE_USER" );
var logon_user = Request.ServerVariables( "LOGON_USER" );
var http_authorization = Request.ServerVariables( "HTTP_AUTHORIZATION" );
test.Pass( "Access is anonymous, requiring no password security." );
break;
case 1:
test.Verify( "Password protection is set as basic authentication." );
break;
case 2:
test.Fail( "Access is password protected. The listed user is logged on. To use Dynamic Link this must be disabled. Use IP security with friends.asp instead." );
break;
}
return test;
}
function checkServerVariable()
{
var test = new Test( "Check server variables" );
test.description = "This test generates a table of server variables so that you can review and verify their status. ";
var test = new Test( "Check server config files" );
test.description = "This test checks to see whether the ASP and XML files for Dynamic Link have been properly installed on the server. It also produces a directory tree list of all files in the config folder. ";
test.description += "The following files are required. ";
var fso = Server.CreateObject( "Scripting.FileSystemObject" );
var configPath = fso.GetFolder( Server.MapPath( "." ) + "/../" );
if( error == 0) test.Pass( "All server configuration files are present." );
else test.Fail( error + " file(s) are missing from your config folder." );
return test;
}
function checkServerConfigFilesReturnCode()
{
var test = new Test( "Check config file's line endings" );
test.description = "This test checks whether the Dynamic Link text files have proper line endings. If you upload the config files or other ASP files from a Macintosh using binary upload, ";
test.description += "ASP may not work properly. You must upload ASP files as text. ";
test.description += "Also if the file's line ending is not set to Windows, ASP pages may not work. ";
test.description += "This is set in GoLive under Special>Web Database, Global tab, select Windows (CR/LF) from the popup menu. ";
var fso = Server.CreateObject( "Scripting.FileSystemObject" );
var ts = fso.OpenTextFile( filePath, 1 ); // forReading
var lineCounter = 0;
while( !ts.AtEndOfStream ){
var line = ts.ReadLine();
lineCounter++;
}
test.details += lineCounter + " line(s)<p>\n";
if( lineCounter == 0 ) test.Fail( "The file is empty." );
else if( lineCounter == 1 ) test.Fail( "The file has no line breaks. If the page was uploaded from a Mac, make sure it is uploaded as text." );
else test.Pass( "The file was uploaded correctly." );
}else{
test.details += "config/include/friends.asp was not found<br>\n";
test.Fail( "Server configuration files have not been uploaded properly." );
error++;
}
return test;
}
function checkServerConfigFriendsFile()
{
var test = new Test( "Check config/include/friends.asp file" );
test.description = "This test checks the friends.asp file, which is used to provide IP based security. By default, access to the Dynamic Link files is only allowed to the local host. ";
test.description += "To allow access from machines you need must edit the config/include/friends.asp file to include the IP address of that machine. ";
var fso = Server.CreateObject( "Scripting.FileSystemObject" );
if( error == 0 ) test.Pass( "All XML files format seems to be fine." );
else test.Fail( "One or more XML file(s) have problem(s)." );
return test;
}
function checkServerDefaultDatabaseFiles()
{
var test = new Test("Check default installed database files");
test.description = "This test checks the status of the three sample database files (Adobe.mdb, LooseScrews.mdb & Magazine.mdb) that are installed in config/database folder by default. ";
test.description += "These Microsoft Access (*.mdb) files should be read/write. ";
test.description += "If they are read-only, any update or other database modification action will fail. ";
test.description += "Note: You do not need to keep these database files on your server when you have installed your own database files, however they are required for the sample demo files to work. ";
var fso = Server.CreateObject("Scripting.FileSystemObject");
var configPath = fso.GetFolder(Server.MapPath(".") + "/../");
test.Pass( "All default database files were found." );
}else{
if ( errorReadOnly == 0) test.Verify( "No databases were found. Check the config/database folder." );
else test.Fail( "Database(s) are set as read-only. The MDB files must to be writable to update records. Check the config/database folder." );
}
return test;
}
function checkServerDatabaseFiles()
{
var test = new Test( "Check database files" );
test.description = "This test examines all the database files found in the config/databases folder and produces detailed information about each one. ";
test.description += "MS-Access (*.mdb) files should not be read-only. ";
test.description += "If they are read-only any update or other database modification action will fail. ";
test.description += "If MDB files failed to open a connection, the server may have old MDAC version. ";
test.description += "MDAC 1.5 is installed by default with IIS 4.0, but Dynamic Link requires MDAC 2.1 or later. ";
test.description += "You can get updater from Microsoft website (http://www.microsoft.com/data/). ";
test.description += "If UDL, DSN or XDB files failed to open a connection, these files have incorrect settings or the database is unavailable. ";
test.description += "If OpenSchema fails and the other tests are OK, the local server's ASP engine may not support the OpenSchema() call. ";
test.description += "In this case, the server will not work as a development server with Dynamic Link. ";
var fso = Server.CreateObject( "Scripting.FileSystemObject" );
var folder = fso.GetFolder( server.mapPath( "." ) + "/../databases" );
var error = 0;
var folderContents = new Enumerator( folder.files );
test.description = "If you are still having problems, here's a listing of known issues you can check manually. ";
test.description += "Some problems may be dependent on web server versions, database server, database driver. ";
var title = "";
var symptom = "";
var prescription = "";
test.details = "";
title = "MDAC (Microsoft Data Access) version";
symptom = "MDAC version 1.5 will fail to connect with Access 2000 databases. (MDAC 1.5 is part of the Option Pack for IIS, and is not updated by Windows NT service packs.)";
prescription = "MDAC 2.1 or later is required for Dynamic Link. MDAC is installed in [system drive]:\\Program Files\\Common Files\\System\\ado\\ folder. ";
prescription += "If you have the file ADO210.CHM, the server has MDAC 2.1 installed.";
prescription += "<p>Windows 2000 installs MDAC version 2.5, which is compatible with Dynamic Link.</p>";
prescription += "<p>To update MDAC, go to Microsoft web site http://www.microsoft.com/data/ or do a search for \"MDAC\". ";
prescription += "Microsoft also offers an MDAC version checker, called \"Component Checker\".</p>";